// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  // console.log(to)
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

import resetMessage from './assets/js/resetMessage'; // 解决有多个弹窗的问题
import ElementUI from 'element-ui';
import locale from 'element-ui/lib/locale/lang/en'
import 'element-ui/lib/theme-chalk/index.css'
import axios from "axios"
Vue.prototype.$http = axios
Vue.prototype.$http.defaults.baseURL = process.env.NODE_ENV == "development" ? 'http://192.168.31.121:8012/' : '/'


import "./assets/resetcss/reset.css";
Vue.use(ElementUI, { size: 'small', zIndex: 3000 });
Vue.prototype.$message = resetMessage; // 解决有多个弹窗的问题
Vue.config.productionTip = false;
import "@/assets/resetcss/theme.scss";

// 设置好$t之后，才开始渲染，要不然$t没有配置上，渲染的话，会报错undfined
new Vue({
  el: '#app',
  router,
  // i18n,
  components: { App },
  template: '<App/>'
})







